package rtm;


import java.util.List;

import com.google.inject.Guice;
import com.google.inject.Injector;

import rtm.authentication.FrobHandler;
import rtm.authentication.TokenHandler;
import rtm.core.UrlBuilder;
import rtm.task.Task;
import rtm.task.TaskListHandler;

public class Authentication {
	
	

	public static void main(String[] args) {
		
		try {
			
			final Injector injector = Guice.createInjector(new RtmModule());
			
			Session session = injector.getInstance(Session.class);
			
			//System.out.println(session.getAuthenticationUrl());
			//session.setFrob("c7c4285b157975fe2c659373dbee7659ac48067a");
			
			session.setToken("c47ede52e6d69f43cd4613e15403eeb9bbcb3617");
			//session.verifyPermission();
			  
			final List<Task> tasks = session.getAllTasks();
			
			for (Task task2 : tasks) {
				System.out.println(task2.getName());
			}
			
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

	

}
